<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8;" />
<link href="/dqchat/Public/css/findpw/style.css" type="text/css" rel="stylesheet"></link>
<script type="text/javascript" src="/dqchat/Public/js/jquery-1.11.0.min.js" ></script>
<script>
$(function(){

     function setContent(str) {
str = str.replace(/<\/?[^>]*>/g,''); //去除HTML tag
str.value = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白
return str;
}
  
  $('#submit').click(function(){
 
     ans1=setContent($("#ans1").val());
     ans2= setContent($("#ans2").val());
	 from = $(".from").val();

     ifsubmit= true;
     $.ajax({
             type: "POST",
             url: "<?php echo U('oper');?>",
			 data: {from:from,ans1:ans1,ans2:ans2},
			 dataType: "text",
             success: function(data){
		 
					if(data==1){
						message = "答案1不能为空";
					}else if(data==2){
						message = "答案2不能为空";
					}else if(data==3){
					message = "问题1答案错误";
					}else if(data==4){
					message = "问题2答案错误";
					}else if(data==5){
					message = "验证通过";
					window.location.href="<?php echo U('findpwche');?>";
					}
						alert(message);
			 }
			})	
 })
 })
</script>
</head>
<body>
<div class="menu">
<div class="home_menu1">

	<div class="home_menu2"><a href="<?php echo U('index');?>"><img src="/dqchat/Public/img/qidian/Hlogo.jpg" /></a></div>

	<div class="home_menu3"><a href="<?php echo U('index');?>">起点娱乐</a></div>

	<div class="home_menu4">
	  <ul>
		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/index.html">首页</a ></li>

		<li class="home_bk"><a href ="/dqchat/download/setup.exe">下载中心</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/rank/menu/2.html">人气排行</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/worker/menu/3.html">虚拟商城</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/worker/menu/4.html">个人中心</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/worker/menu/5.html">加盟合作</a></li>
	  </ul>
	</div>
</div>
<div class="menu1">
<table>
<tr><td class="title">找回密码</td></tr>
<tr><td><image src="/dqchat/Public/img/findpw/line1.jpg"/></td></tr></table>
<form>
<input type="hidden" name="from" class="from" value='1'  />
<table class="pwpr_title1">
<tr><td class="pwpr_title2" colspan=2>说明:请输入你原来的密码保护问题的答案！！！</td></tr>
<tr><td class="pwpr_password">密保问题1:</td><td class="pwpr_password1"><?php echo ($q1); ?></td></tr>
<tr><td class="pwpr_password">密保答案1:</td><td class="pwpr_text"><input type="text" name="ans1" id="ans1"></td></tr>
<tr><td class="pwpr_password">密保问题2:</td><td class="pwpr_password1"><?php echo ($q2); ?></td></tr>
<tr><td class="pwpr_password">密保答案2:</td><td class="pwpr_text"><input type="text" name="ans1" id="ans2"></td></tr>
<tr><td></td><td class="pwpr_sure" ><div id="submit">确&nbsp&nbsp&nbsp&nbsp定</div></td></tr>
</table>
</form>
</div>
</div>
</body>
</html>